home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 8: LINUX Games / Linux Cubed Series 8 - LINUX Games.iso / games / video / fly8111-.000 / fly8111- / fly8 / notimer.c < prev    next >
C/C++ Source or Header  |  1979-12-31  |  863b  |  61 lines

  1. /* --------------------------------- notimer.c ------------------------------ */
  2.  
  3. /* This is part of the flight simulator 'fly8'.
  4.  * Author: Eyal Lebedinsky (eyal@ise.canberra.edu.au).
  5. */
  6.  
  7. /* Dummy timer driver.
  8. */
  9.  
  10. #include "fly.h"
  11.  
  12. #include <time.h>
  13.  
  14.  
  15. LOCAL_FUNC int FAR
  16. ntm_hires (void)
  17. {return (0);}
  18.  
  19. LOCAL_FUNC Ulong FAR
  20. ntm_milli (void)
  21. {return (0);}
  22.  
  23. LOCAL_FUNC Ulong FAR
  24. ntm_interval (int mode, Ulong res)
  25. {return (0);}
  26.  
  27. LOCAL_FUNC int FAR
  28. ntm_init (char *options)
  29. {return (0);}
  30.  
  31. LOCAL_FUNC void FAR
  32. ntm_term (void)
  33. {}
  34.  
  35. LOCAL_FUNC char * FAR
  36. ntm_ctime (void)
  37. {
  38.     time_t    tm;
  39.     char    *t;
  40.     int    len;
  41.  
  42.     tm = time (0);
  43.     t = ctime (&tm);
  44.     len = strlen (t) - 1;
  45.     if ('\n' == t[len])
  46.         t[len] = '\0';        /* kill NewLine */
  47.     return (t);
  48. }
  49.  
  50. struct TmDriver NEAR TmNone = {
  51.     "NoTimer",
  52.     0,
  53.     NULL,
  54.     ntm_init,
  55.     ntm_term,
  56.     ntm_milli,
  57.     ntm_hires,
  58.     ntm_ctime,
  59.     ntm_interval
  60. };
  61.